<template>
  <div class="app">
    <!-- 主题切换按钮 -->
    <button @click="toggleTheme" class="p-2 rounded-full bg-primary">
      {{ theme === 'light' ? '切换到暗黑模式' : '切换到白色模式' }}
    </button>
    <!-- 其他内容 -->
    <router-view />
  </div>
</template>

<script setup lang="ts">
import { useSettings } from '@renderer/store/settings'
import { storeToRefs } from 'pinia'

const settingsStore = useSettings()
const { theme } = storeToRefs(settingsStore)
const toggleTheme = () => {
  settingsStore.toggleTheme()
}
</script>
